#include"SLDate.h"


void test()
{
	SL st;
	Init_SLDate(&st);
	push_back(&st,1);
	push_back(&st, 2);
	push_back(&st, 3);
	push_back(&st, 4);
	Print(&st);
	push_front(&st,100);
	push_front(&st, 200);
	push_front(&st, 300);
	push_front(&st, 400);
	Print(&st);
	push_after(&st, 2, 1000);
	Print(&st);
	push_after(&st, 400, 1000);
	Print(&st);
	push_after(&st, 10, 1000);
	Print(&st);
}

void test1()
{
	SL st;
	Init_SLDate(&st);
	push_after(&st,0, 1);
	push_after(&st,1, 2);
	push_after(&st,2, 3);
	push_after(&st,3, 4);
	Print(&st);
	push_before(&st, 1, 100);
	push_before(&st, 100, 200);
	push_before(&st, 3, 600);
	push_before(&st, 0, 100);
	push_after(&st, 4, 10);
	Print(&st);
	pop_back(&st);
	Print(&st);
	pop_back(&st);
	Print(&st);
	pop_back(&st);
	Print(&st);
	pop_back(&st);
	Print(&st);
	printf("--------------\n");
	pop_front(&st);
	Print(&st);
	pop_front(&st);
	Print(&st);
	pop_front(&st);
	Print(&st);
	pop_front(&st);
	Print(&st);
	pop_front(&st);
	Print(&st);
}

void test2()
{
	SL st;
	Init_SLDate(&st);
	push_after(&st, 0, 1);
	push_after(&st, 1, 2);
	push_after(&st, 2, 3);
	push_after(&st, 3, 4);
	Print(&st);
	pop(&st, 100);
	Print(&st);
	
	pop(&st, 1);
	Print(&st);
	push_after(&st, 3, 400);
	Print(&st);
	pop(&st, 2);
	Print(&st);
	pop(&st, 3);
	Print(&st);
	pop(&st, 4);
	Print(&st);
	pop(&st, 4);
	Print(&st);
}

int main()
{
	//test();
	//test1();
	test2();
	
	return 0;
}